// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.linqingying.gitcode.api.data.pullrequest

import com.intellij.collaboration.api.dto.GraphQLConnectionDTO
import com.intellij.collaboration.api.dto.GraphQLCursorPageInfoDTO
import com.intellij.collaboration.api.dto.GraphQLFragment

@GraphQLFragment("/graphql/fragment/pullRequestMergeability.graphql")
data class GCPullRequestMergeabilityData(
  val mergeable: GCPullRequestMergeableState,
  val canBeRebased: Boolean,
  val mergeStateStatus: GCPullRequestMergeStateStatus,
  val commits: GCPullRequestCommitWithCheckStatusesConnection
) {

  class GCPullRequestCommitWithCheckStatusesConnection(
    pageInfo: GraphQLCursorPageInfoDTO,
    nodes: List<GCPullRequestCommitWithCheckStatuses>
  ) : GraphQLConnectionDTO<GCPullRequestCommitWithCheckStatuses>(pageInfo, nodes)
}
